package com.simple.piger.exception;


import com.simple.piger.constant.ErrorCode;

public class ServerException extends RuntimeException {

    private static final long serialVersionUID = -8634700792767837033L;

    public ErrorCode errorCode;

    public ServerException() {
        super("服务器错误");
        this.errorCode = ErrorCode.INTERNAL_SERVER_ERROR;
    }

    public ServerException(String message, ErrorCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public ServerException(String message) {
        super(message);
        this.errorCode = ErrorCode.INTERNAL_SERVER_ERROR;
    }

    public ServerException(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }
}
